﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RssReader.Core.Global
{
	public class RssApplication
	{
		#region Private Properties
		private static RssApplication _instance;
		#endregion

		#region Public Properties

		#endregion

		#region Constructors
		private RssApplication()
		{
			if (RssApplication._instance != null)
			{
				throw new SystemException("application can not be initialed twice");
			}
		}
		#endregion

		#region Private Methods

		#endregion

		#region Public Methods
		public static void Start()
		{
			_instance = new RssApplication();
			_instance.Initialize();
		}

		private void Initialize()
		{
			System.Web.Hosting.HostingEnvironment.RegisterVirtualPathProvider(new RssVirtualPathProvider());
		}
		#endregion
	}
}
